home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 552 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  8.0 KB

  1. Path: conch.aa.msen.com!not-for-mail
  2. From: brain@mail.msen.com (Jim Brain)
  3. Newsgroups: alt.folklore.computers,comp.sys.cbm
  4. Subject: Re: Vic-20/C-64 serial ports
  5. Date: 10 Jan 1996 17:04:13 -0500
  6. Organization: Brain Innovations, Incorporated
  7. Sender: brain@msen.com
  8. Message-ID: <hrp8wwyjt43D088yn@mail.msen.com>
  9. References: <4cn3ba$ifj@celebrian.otago.ac.nz>
  10. NNTP-Posting-Host: conch.aa.msen.com
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=ISO-8859-1
  13. Content-Transfer-Encoding: 8bit
  14. X-Newsreader: Yarn 0.88 with YES 0.21.B1109
  15. X-URL: http://www.msen.com/~brain/
  16.  
  17.  
  18.  
  19. In article <4cn3ba$ifj@celebrian.otago.ac.nz>,
  20. simon.brady@stonebow.otago.ac.nz (The Arch-Deviant) wrote:
  21. >Isn't it scary what you remember? I was staring at the "please wait..." message
  22. >on a swipe-card reader this morning, and started thinking about how much of my
  23. >youth was spent reading those same words while waiting for Vic-20 programs to
  24. >load off tape. This got me thinking about how, by the time we had a C-128 (but
  25. >still no disk drive), things had advanced to "Invader Load", a hectic version
  26. >of space invaders you could play while the tape rolled.
  27. >
  28. >The reason they could do this was that tape I/O was interrupt-driven, and to
  29. >finally get to the point of this post I'm struck by the irony of a system that
  30. >has interrupt-driven code for tape but software polling for disk I/O.
  31. >
  32. >My question is, why did Commodore implement the serial protocol in software?
  33. >Both the 6522 and 6526 had hardware shift registers and associated interrupt
  34. >capability, but until the 128's fast serial mode these were never used. Does
  35. >anyone know why not?
  36. >
  37. >TIA...
  38. >
  39. >Simon Brady                       "I've been an awful woman all my life
  40. >University of Otago                A dreadful daughter and a hopeless wife
  41. >Dunedin, New Zealand               Well I've had my eyes on that carving knife
  42. >simon.brady@stonebow.otago.ac.nz   Oh you've been lucky, so far..."
  43. >                                                    - Kirsty MacColl, 'Bad'
  44.  
  45.  
  46. From the trivia:
  47.  
  48.  
  49. Q $07B) When the VIC-20 was designed, the serial port throughput was roughly
  50.         equivalent to the throughput of the IEEE-488 bus?  Why isn't it
  51.         very fast in production VICs?
  52.     
  53. A $07B) Let's go back to question $04F:
  54.  
  55.         <begin insert>
  56.         Q $04F) What was the primary reason Commodore went to a serial bus
  57.                 with the introduction of the VIC-20?
  58.  
  59.         A $04F) Jim Butterfield supplied me with this one:
  60.  
  61.                 As you know, the first Commodore computers used the IEEE bus
  62.                 to connect to peripherals such as disk and printer.  I 
  63.                 understand that these were available only from one source:  
  64.                 Belden cables.  A couple of years into Commodore's computer 
  65.                 career, Belden went out of stock on such cables (military 
  66.                 contract? who knows?).  In any case, Commodore were in quite 
  67.                 a fix:  they made computers and disk drives, but couldn't 
  68.                 hook 'em together! So Tramiel issued the order:  "On our next 
  69.                 computer, get off that bus.  Make it a cable anyone can 
  70.                 manufacture".  And so, starting with the VIC-20 the serial 
  71.                 bus was born.  It was intended to be just as fast as the
  72.                 IEEE-488 it replaced.                    
  73.         <end insert>
  74.         
  75.         And here is what Jim Butterfield followed up with:
  76.         
  77.         "Technically, the idea was sound:  the 6522 VIA chip has a "shift
  78.         register" circuit that, if tickled with the right signals (data and 
  79.         clock) will cheerfully collect 8 bits of data without any help from 
  80.         the CPU.  At that time, it would signal that it had a byte to be 
  81.         collected, and the processor would do so, using an automatic 
  82.         handshake built into the 6522 to trigger the next incoming byte.  
  83.         Things worked in a similar way outgoing from the computer, too.
  84.         We early PET/CBM freaks knew, from playing music, that there was 
  85.         something wrong with the 6522's shift register:  it interfered with 
  86.         other functions.  The rule was:  turn off the music before you start 
  87.         the tape!  (The shift register was a popular sound generator).  But 
  88.         the Commodore engineers, who only made the chip, didn't know this.  
  89.         Until they got into final checkout of the VIC-20.      
  90.         
  91.         By this time, the VIC-20 board was in manufacture.  A new chip could
  92.         be designed in a few months (yes, the silicon guys had application 
  93.         notes about the problem, long since), but it was TOO LATE!
  94.         
  95.         A major software rewrite had to take place that changed the VIC-20
  96.         into a "bit-catcher" rather than a "character-catcher".  It called for
  97.         eight times as much work on the part of the CPU; and unlike the shift
  98.         register plan, there was no timing/handshake slack time.  The whole
  99.         thing slowed down by a factor of approximately 5 to 6.
  100.         
  101.         When the 64 came out, the problem VIA 6522 chip had been
  102.         replaced by the CIA 6526.  This did not have the shift register 
  103.         problem which had caused trouble on the VIC-20, and at that time it 
  104.         would have been possible to restore plan 1, a fast serial bus.  Note 
  105.         that this would have called for a redesign of the 1540 disk drive, 
  106.         which also used a VIA.  As best I can estimate - and an article in 
  107.         the IEEE Spectrum magazine supports this - the matter was discussed 
  108.         within Commodore, and it was decided that VIC-20 compatibility was 
  109.         more important than disk speed.  Perhaps the prospect of a 1541 
  110.         redesign was an important part of the decision, since current 
  111.         inventories needed to be taken into account.  But to keep the 
  112.         Commodore 64 as a "bit-banger", a new problem arose.
  113.  
  114.         The higher-resolution screen of the 64 (as compared to the VIC-20)
  115.         could not be supported without stopping the CPU every once in a while.
  116.         To be exact:  Every 8 screen raster lines (each line of text), the CPU
  117.         had to be put into a WAIT condition for 42 microseconds, so as to 
  118.         allow the next line of screen text and color nybbles to be swept into
  119.         the chip.(More time would be needed if sprites were being used).
  120.         But the bits were coming in on the serial bus faster than that:  
  121.         a bit would come in about every 20 microseconds!  So the poor CPU, 
  122.         frozen for longer than that, would miss some serial bits completely!
  123.         Commodore's solution was to slow down the serial bus even more.
  124.         That's why the VIC-20 has a faster serial bus than the 64, even though
  125.         the 64 was capable, technically, of running many times faster.
  126.    
  127.         Fast disk finally came into its own with the Commodore 128."
  128.  
  129.                                  --Jim
  130.  
  131. Q $07C) On Commodore computers, how much RAM is set aside as a tape buffer?
  132.  
  133. A $07C) 192 bytes is used as a tape buffer.  Blocks of data on tape are 192
  134.         bytes long.
  135.  
  136. Q $07D) On Commodore computers, most every peripheral has a device number.
  137.         What is the device number of the screen?
  138.  
  139. A $07D) #3
  140.      
  141. Q $07E) What is the device number of the keyboard?
  142.  
  143. A $07E) #0
  144.      
  145. Q $07F) Commodore computers use 2's-complement notation to represent integers.
  146.         What is the 2's-complement hex representation of the signle byte -1? 
  147.  
  148. A $07F) (This was not a Commodore specific question)  Commodore computers
  149.         use this notation to represent integer quantities.  In 2's complement
  150.         notation, a -1 looks like 11111111(binary) or $FF(hex).
  151.      
  152. End of Commodore Trivia Edition #8!
  153.  
  154. Jim Brain
  155. brain@mail.msen.com
  156. 2306 B Hartland Road
  157. Hartland, MI  48353
  158. (810) 737-7300 x8528
  159.  
  160.  
  161.  
  162.  
  163. -- 
  164. Jim Brain, Embedded Systems Designer, Brain Innovations, Inc.  (BII)
  165. brain@mail.msen.com "Above views DO reflect my employer, since I'm my employer"
  166. Dabbling in WWW, Embedded Systems, VR, Old CBM computers, and Good Times! -Me-
  167. <a href=http://www.msen.com/~brain/>BII, VR, CBM, and personal info</a>
  168.